
import { Outlet, useNavigate } from 'react-router-dom'

import '../index.scss'
import type { MenuProps  } from 'antd';
import { Menu } from 'antd';

export default function Index() {
type NavigateFunctionType=typeof useNavigate
type DateType={
  label: string;
  key: string;
  path?:string;
}
let nav=useNavigate()
  const items: DateType[] =[
    {
      label: '组织管理',
      key: '/Systemadministration/Organizationalmanagement',
    
    },
    {
        label:'用户管理',
        key:'/Systemadministration/Usermanagement'
   
    },
    {
        label:'角色管理',
        key:'/Systemadministration/Rolemanagement'
       
    }
  ]

  const onClick: MenuProps['onClick'] = (e) => {
        nav(e.key)
  };
  return (
    <div className='pzbfu'>
        
  <Menu
      onClick={onClick}
      style={{ width: 256 }}
      defaultSelectedKeys={['1']}
      defaultOpenKeys={['sub1']}
      mode="inline"
      items={items}
    />
        <Outlet></Outlet>
    </div>
  )
}
